//----------------------------------------------------------
// Engine.h
//   Core engine / game class declaration
// Loosely based off code from DeVry University, GSP420
//----------------------------------------------------------

#ifndef _ENGINE_H_
#define _ENGINE_H_

#include <windows.h>
#include "Utilities/File.h"
#include "GraphicsManager.h"
#include "HUDManager.h"

class Engine
{
private:
	// window references
	HWND* _wndHandle;
	HINSTANCE* _hInst;

	// managers
	GraphicsManager* _graphicsManager;
	HUDManager* _hudManager;

	float _fps;			// frames/sec
	float _frameTime;	// frame time in ms
	bool _isPaused;		// game is paused
	bool _isOver;		// player exits game

public:
	// constructor/destructor
	Engine();
	~Engine();

	// housekeeping functions
	bool Initialize(HWND* wndHandle, HINSTANCE* hInst);
	bool Update(float deltaTime);
	bool Render();
	bool ShutDown();

	bool isPaused() { return _isPaused; }
	bool isOver() { return _isOver; }

	void SetPause(bool pause) { _isPaused = pause; }
	void Quit() { _isOver = true; }

	float GetFPS() { return _fps; }
	void SetFPS(float fps) { _fps = fps; }

	float GetFrameTime() { return _frameTime; }
	void SetFrameTime(float deltaTime) { _frameTime = deltaTime; }

	HWND* GetWindow() { return _wndHandle; }
	HINSTANCE* GetHInstance() { return _hInst; }
};

#endif